package cn.controller.order;

import cn.service.orderService.OrderServiceImpl.OrderServiceImpl;
import entity.orderEntity.OrderConditon;
import entity.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 朱颢阳
 * @description
 * @time 2024/8/27 16:27
 */
@RestController
@CrossOrigin
@RequestMapping("/order")
public class OrderController {
    @Autowired
    OrderServiceImpl service;
    @RequestMapping("/getOrderList")
    public Result getOrderList(@RequestBody OrderConditon orderConditon){
        return service.selectAll(orderConditon);
    }
    @RequestMapping("/deleteorder")
    public Result deleteorder(Integer id){
        return service.deleteorder(id);
    }
    @RequestMapping("/getOrderAll")
    public Result getOrderAll(Integer order_id){
        return service.getOrderAll(order_id);
    }
}
